<!--  -->
<template>
  <div class='outArea-page'>
    <div class="outArea-info flex-a-c">
      <van-image
        round
        width="55px"
        height="55px"
        :src="userInfo.avatar_image"
      />
      <div class="flex info-user">
        <h3>{{userInfo.username}}</h3>
        <p v-if="frozeLove <= 0">冻结{{loveName}}不足已丢失</p>
      </div>
      
    </div>
    <div class="account-board">
      <div class="account flex-a-c">
        <div class="account-box">
          <h3>￥{{statistical.surplus_released || '0.00'}}</h3>
          <p>未释放</p>
        </div>
        <div class="account-box">
          <h3>￥{{statistical.finish_released || '0.00'}}</h3>
          <p>已释放</p>
        </div>
      </div>
      <div class="account-content">
        <van-tabs v-model="status" title-active-color="#F15353" title-inactive-color="#454545"  @click="ontabClick">
          <block v-for="(item,index) in tabList" :key="index" >
            <van-tab :title="item.name" :name="item.status"></van-tab>
          </block>
        </van-tabs>
        <div class="account-list" v-if="recordList.length > 0 ">
          <block v-for="(item,index) in recordList" :key="index">
            <div class="account-box">
            <div class="account-order flex-a-c flex-j-sb">
                <h3>{{item.order_sn}}</h3>
                <div class="account-status" :class="item.status === 1 ? 'red':''">{{item.status_str}}</div>
              </div>
              <div class="account-time">{{item.created_at}}</div>
              <div class="release-box flex-a-c">
                <div class="release-left">
                  <p>总释放: {{item.released_price || '0.00'}}</p>
                  <p>已释放: {{item.finish_released || '0.00'}}</p>
                </div>
                <div class="release-right">
                  <p>释放比例: {{parseFloat(item.released_proportion)}}%</p>
                  <p>未释放: {{item.surplus_released || '0.00'}}</p>
                </div>
              </div>
            </div>
          </block>
        </div>
        <van-empty description="暂无数据" v-else />
      </div>
      <div class="mh-50"></div>
    </div>
  </div>
</template>

<script>
import loveValue_controller from './loveValue_controller';
export default loveValue_controller;
</script>
<style lang="scss" scoped>
/* @import url(); 引入公共css类 */
  .mh-50 {
    height: 3.125rem;
    clear: both;
  }
  .outArea-page {
    height: auto;
    min-height: 100vh;
    background-image: linear-gradient(#FF8924 0%,#FF8924 7.5rem,#F7F8FB 7.5rem ,#F7F8FB 100%);
    .outArea-info {
      padding:1.3125rem 0.75rem 1.5rem 0.75rem;
      .info-user {
        flex-direction: column;
        padding:0 0 0 0.8125rem;
        text-align: left;
        h3 {
          font-size: 1rem;
          font-weight: bold;
          color: #FFFFFF;
        }
        p {
          color: #FFFFFF;
        }
      }
      
    }
    .account-board {
      margin: 0 0.75rem;
      .account {
        background-color: #fff;
        border-radius: 0.3125rem;
        padding:1.125rem 0 1rem 0;
        .account-box {
          width:50%;
          &:first-child {
            border-right: 1px solid #E7E7E7;
          }
          h3 {
            font-size: 0.8125rem;
            color: #F14E4E;
            padding:0 0 0.625rem 0;
          }
          p {
            font-size: 0.6875rem;
            color: #696969;
          }
        }
      }
      .account-content {
        margin:0.625rem 0 0 0;
        border-radius: 0.3125rem;
        background-color: #fff;
        padding: 0 0.75rem;
        .account-list {
          margin:0.4375rem 0 0 0;
          .account-box {
            padding:0.625rem 0;
            border-top: 0.0625rem solid #F2F2F2;
            // &:last-child {
            //   border:none;
            // }

            .account-order {
              color: #333333;
              font-size: 0.8125rem;
              padding:0 0 0.375rem 0;
            }
            .account-status {
                font-size: 0.75rem;
                color: #999999;
            }
            .red {
              color:#FB6B68;
            }
            .account-time {
              text-align: left;
              font-size: 0.6875rem;
              padding:0 0 0.625rem  0;
              color: #999999;
            }
            .release-box {
              .release-left,.release-right {
                flex:1;
                text-align: left;
                font-size: 0.75rem;
                color: #3B3B4A;
                p:first-child {
                  padding:0 0 0.75rem 0;
                }
              }
            }
          }
        }
      }
    }
  }
</style>